import { MoonOutlined, SunOutlined } from '@ant-design/icons';
import { FloatButton } from 'antd';
import { useThemeMode } from 'antd-style';

export const Menu = () => {
    const { isDarkMode, setThemeMode } = useThemeMode();
    const changeThemeMode =() => setThemeMode(isDarkMode  ? 'light' : 'dark');

    return (
        <FloatButton style={{ bottom: '26px', right: '12px' }}
            onClick={changeThemeMode}
            icon={isDarkMode ? <SunOutlined /> : <MoonOutlined />}
        />
    );
};